﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Yugi_Gui;
namespace Yugi_Gui.Animation
{
    class TransportAnimation
     {
        TranslateTransform translate;
        SequenceImage img;
        Point center;
        public TransportAnimation(SequenceImage img)
        {
            this.img = img;
            Init();
        }
        private void Init()
        {
            TransformGroup group = img.RenderTransform as TransformGroup;
            translate = group.Children[3] as TranslateTransform;
            center = new Point(img.Width / 2, img.Height / 2);

           
        }
        public Point Center
        {
            get
            {
                return center;
            }
            set
            {
                center = value;
                translate.X = value.X - img.Width / 2;
                translate.Y = value.Y - img.Height / 2;
            }
        }
    }
}
